package com.example.blog.exception;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;

/**
 * @ClassName NewWifiLoginException
 * @Description TODO
 * @Author
 * @Date 2020/5/13 15:49
 * @Version 1.0
 */
@Data
@Builder
@AllArgsConstructor
public class NewWifiLoginException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    protected final String message;
    /**
     * 消息码
     */
    private int code;

    public NewWifiLoginException(String message) {
        this.message = message;
    }

    public NewWifiLoginException(String message, Throwable e) {
        super(message, e);
        this.message = message;
    }
    public NewWifiLoginException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
